﻿using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using StartsEAS_API.BLL.Interfaces.IAlterWorkerB;
using StartsEAS_API.Model;

namespace StartsEAS_API.Controllers.AlterWorkerContor
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [EnableCors("any")]
    public class AlterWorkerController : ControllerBase
    {
        private readonly IAlterWorkerBLL _alterWorkerBll;
        public AlterWorkerController(IAlterWorkerBLL alterWorkerBll) { 
            _alterWorkerBll = alterWorkerBll;
        }
        /// <summary>
        /// 根据Token查询职工信息修改表信息
        /// </summary>
        /// <param name="token">token</param>
        /// <returns></returns>
        [HttpGet]
        public ResultUtils GetAllAlterWorkerByWorkerId(string token) { 
            return _alterWorkerBll.GetAllAlterWorkerByWorkerId(token);
        }

    }
}
